package org.cw.action;

import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;
import org.cw.vo.MemberVo;

public class MemberAction extends BasicAction 
{
	private MemberVo memberVo;
	
	public MemberVo getMemberVo() {
		return memberVo;
	}

	public void setMemberVo(MemberVo memberVo) {
		this.memberVo = memberVo;
	}

	public String login()
	{
		getSession().put("account", memberVo.getAccount());
		System.out.println(ServletActionContext.getRequest().getSession());
		return SUCCESS;
	}
	
	public String loginout()
	{
		HttpSession session = ServletActionContext.getRequest().getSession();
		session.invalidate();
		System.out.println(session);
		return SUCCESS;
	}
}
